import { Modal } from "ant-design-vue"


//modal组件 -  confirm方法
interface Iconfirm {
    title?: string
    cancelText?: string
    okText?: string
    onOK(): any
    [propsName: string]: any
}
export const ModalConfirm = (options: Iconfirm): void => {
    Modal.confirm({
        title: "确定删除吗？",
        closable: true,
        cancelText: "取消",
        okText: "确定",
        okType: "danger",
        class: "modal-confirm-view",
        onOk: () => {
            return options && options.onOK()
        },
    })
}